Using parametric set constraints for locating errors in CLP programs
نویسندگان
چکیده
This paper introduces a framework of parametric descriptive directional types for constraint logic programming (CLP). It proposes a method for locating type errors in CLP programs and presents a prototype debugging tool. The main technique used is checking correctness of programs w.r.t. type speciications. The approach is based on a generalization of known methods for proving correctness of logic programs to the case of parametric speciications. Set-constraint techniques are used for formulating and checking veriica-tion conditions for (parametric) polymorphic type speciications. The speciications are expressed in a parametric extension of the formalism of term grammars. The soundness of the method is proved and the prototype debugging tool supporting the proposed approach is illustrated on examples. The paper is a substantial extension of the previous work by the same authors concerning monomorphic directional types.
منابع مشابه
Intensional Sets in CLP
We propose a parametric introduction of intensionally defined sets into any CLP (D) language. The result is a language CLP ({D}), where constraints over sets of elements of D and over sets of sets of elements, and so on, can be expressed. The semantics of CLP ({D}) is based on the semantics of logic programs with aggregates and the semantics of CLP over sets. We investigate the problem of const...
متن کاملVerification of Imperative Programs through Transformation of Constraint Logic Programs
In the last decade formal techniques have received a renewed attention as the basis of a methodology for increasing the reliability of software artifacts and reducing the cost of software production. In particular, great efforts have been made to devise automatic techniques such as software model checking [20], for verifying the correctness of programs with respect to their specifications. In m...
متن کاملMeta-Programming in CLP(R)
A widely used property of Prolog is that it is possible to write Prolog programs to construct and manipulate other Prolog programs in a very general manner. Unfortunately , this property is not carried over to richer languages such as CLP(R) { the manipulation of CLP(R) programs in CLP(R) is quite limited. The reason is that the equality of terms in CLP(R) is not based on their syntactic struct...
متن کاملUsing Real Relaxations during Program Specialization
We propose a program specialization technique for locally stratified CLP(Z) programs, that is, logic programs with linear constraints over the set Z of the integer numbers. For reasons of efficiency our technique makes use of a relaxation from integers to reals. We reformulate the familiar unfold/fold transformation rules for CLP programs so that: (i) the applicability conditions of the rules a...
متن کاملAnswers Synthesis for CLP with Negation
Rewrite techniques can be used to execute logic programs in order to avoid some drawbacks of classical Prolog resolution. Logic programs are represented as rewrite programs whose operational mechanism, inspired from Knuth-Bendix completion, allows to prune some unnecessary computations and offers a synthesis ability which enables to represent infinite sets of answers as finite sets of formulas....
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- TPLP
دوره 2 شماره
صفحات -
تاریخ انتشار 2002